/*
 * Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.xuexiang.xgithubclient.core.db.entity;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 *
 *
 * @author xuexiang
 * @since 2019-07-05 00:27
 */
@DatabaseTable(tableName = "local_user")
public class LocalUser {

    @DatabaseField(generatedId = true)
    private long Id;
    @DatabaseField
    private String login;
    @DatabaseField
    private String name;
    @DatabaseField
    private String avatarUrl;
    @DatabaseField
    private int followers;
    @DatabaseField
    private int following;

    public LocalUser() {
    }

    public LocalUser(String login) {
        this.login = login;
    }

    public LocalUser(String login, String name, String avatarUrl, int followers, int following) {
        this.login = login;
        this.name = name;
        this.avatarUrl = avatarUrl;
        this.followers = followers;
        this.following = following;
    }

    public long getId() {
        return Id;
    }

    public LocalUser setId(long id) {
        Id = id;
        return this;
    }

    public String getLogin() {
        return login;
    }

    public LocalUser setLogin(String login) {
        this.login = login;
        return this;
    }

    public String getName() {
        return name;
    }

    public LocalUser setName(String name) {
        this.name = name;
        return this;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public LocalUser setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
        return this;
    }

    public int getFollowers() {
        return followers;
    }

    public LocalUser setFollowers(int followers) {
        this.followers = followers;
        return this;
    }

    public int getFollowing() {
        return following;
    }

    public LocalUser setFollowing(int following) {
        this.following = following;
        return this;
    }

    @Override
    public String toString() {
        return "LocalUser{" +
                "Id=" + Id +
                ", login='" + login + '\'' +
                ", name='" + name + '\'' +
                ", avatarUrl='" + avatarUrl + '\'' +
                ", followers=" + followers +
                ", following=" + following +
                '}';
    }
}
